import React from 'react';
import {connect} from 'dva';
import  {Link}from 'dva/router'
import  {Button}from 'antd-mobile'

const Main = (props) => {
  const handleIndex = () => {
    props.dispatch({
      type: 'login/pushRouter',
      payload: 'index',
    })
  }
  return <div>
    <Button onClick={handleIndex}>to index</Button>
  </div>
}
export default connect(state => state)(props => <Main {...props}/>)

